package com.zoro.barn.commons.redis.tools;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author zhaoxingwu
 */
@ConfigurationProperties("barn.tool.properties")
public class RedisToolProperties {

    private String host = "localhost";
    private int port = 6379;
    private String password;
    private long timeout = 1000;
    private int db = 0;
    private int poolSize=10;

    public int getPoolSize() {
        return poolSize;
    }

    public void setPoolSize(int poolSize) {
        this.poolSize = poolSize;
    }

    public int getDb() {
        return db;
    }

    public void setDb(int db) {
        this.db = db;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public long getTimeout() {
        return timeout;
    }

    public void setTimeout(long timeout) {
        this.timeout = timeout;
    }

    @Override
    public String toString() {
        return "RedisToolProperties{" +
                "host='" + host + '\'' +
                ", port=" + port +
                ", password='" + password + '\'' +
                ", timeout=" + timeout +
                ", db=" + db +
                ", poolSize=" + poolSize +
                '}';
    }
}
